From c254da50e77796db9f5cefb756d9e4de0477d3f3 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Wed, 7 Mar 2007 18:06:14 +0000 Subject: [PATCH] YAY FOR PHP GLOBAL HANDLING (and thanks Rob) --- includes/User.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/User.php b/includes/User.php index 3b8caf0264..b42f1262dd 100644 --- a/includes/User.php +++ b/includes/User.php @@ -949,6 +949,7 @@ class User { * @return bool */ public function isPingLimitable() { + global $wgRateLimitsExcludedGroups; return array_intersect($this->getEffectiveGroups(), $wgRateLimitsExcludedGroups) != array(); } @@ -963,22 +964,22 @@ class User { * @public */ function pingLimiter( $action='edit' ) { - + # Call the 'PingLimiter' hook $result = false; if( !wfRunHooks( 'PingLimiter', array( &$this, $action, $result ) ) ) { return $result; } - + global $wgRateLimits, $wgRateLimitsExcludedGroups; if( !isset( $wgRateLimits[$action] ) ) { return false; } - + # Some groups shouldn't trigger the ping limiter, ever if( !$this->isPingLimitable() ) return false; - + global $wgMemc, $wgRateLimitLog; wfProfileIn( __METHOD__ ); -- 2.20.1